<!--
 * @Descripttion: image 再封装
 * @version: 
 * @Author:Hui
 * @Date: 2022-11-24 14:57:23
 * @LastEditTime: 2023-11-09 15:57:52
 * @LastEditors: sueRimn
-->

<template>
  <image
    :class="className||''"
    :src="src || noImage"
    :mode="mode"
    :style="styles"
    :lazy-load="lazyLoad"
  />
</template>

<script>

import blank from '@/static/images/blank.png'

export default {
  name: 'common-image',
  props: {
    className: { type: String, default: '' },
    src: { type: String, default: blank },
    styles: { type: String, default: '' },
    mode: { type: String, default: 'scaleToFill' },
    lazyLoad: { type: Boolean, default: true }
  },

  data() {
    return {
      noImage: blank,
    }
  }
}
</script>